The development of the EDVAC computer system of 1948 is often cited as the beginning of the computer era. Since that time, computer systems have evolved into extremely sophisticated devices, and computer systems may be found in many different settings. Computer systems typically include a combination of hardware, such as semiconductors and circuit boards, and software, also known as computer programs or code.
One frequent problem in the development and modification of code is the longer the life cycle of the software, the more changes the code requires. As more changes are put into the code, the code becomes more complex and more difficult to understand and therefore more prone to programming errors in the next modifications. Code that is prone to programming errors is often called fragile. Perhaps the most significant cause for code becoming fragile over time is programmers making modifications to the code via a copy-and-paste technique.
For example, the programmer recognizes that pre-existing code at a first path or location is also needed by a second path or location, so the programmer copies the code from the first location and pastes it into the second location. Identical code now exists in two locations. The copy-and-past technique is quick and easy for the programmer at the moment, but it creates a situation that may cause errors later on. For example, if the programmer later discovers that the copied code has an error and fixes the error in the first location, but forgets that the copied code also exists at the second location, then the error is only partially resolved. Thus, the copy-and-paste technique for creating new code results in fragile software that requires a careful programmer with good recall of code changes that have been made in the past.
A good programmer knows that the way to avoid problems caused by the copy-and-paste technique is to create a separate routine that includes the code and call the routine from both the first and the second location. Thus, the code only exists in one place: the separate routine. If the code ever requires modifications in the future, the programmer need only modify the separate routine, and the programmer is not burdened with trying to remember all of the locations where the code exists. Unfortunately, programmers rarely take the time and effort to create a separate routine because it requires additional work at the moment, and programmers are routinely rushed and under pressure to work quickly.
Without a better way to handle code modifications, computer software will continue to suffer from errors and fragility, which results in less reliable computer software, which is more expensive to maintain.